using System;

namespace NEnsure.Validators
{
	public class PropertyRulesEventArgs : EventArgs, ICancelable
	{
		private readonly string _propertyName;
		private readonly IBusinessRule[] _rules;
		private bool _cancel;

		public string PropertyName
		{
			get { return _propertyName; }
		}

		public IBusinessRule[] Rules
		{
			get { return _rules; }
		}

		public bool Cancel
		{
			get { return _cancel; }
			set { _cancel = value; }
		}

		public PropertyRulesEventArgs(string propertyName, IBusinessRule[] rules)
		{
			_propertyName = propertyName;
			_rules = rules;
		}
	}
}
